﻿namespace Agile.Service.Admin.Model.ViewModel.Sys;

public class InsertSysMenuRequest
{
    ///<summary>菜单名称</summary>
    [JsonConverter(typeof(StringTrimConverter))]
    public string MenuName { get; set; }

    ///<summary>菜单类型（1＝系统；2＝目录；3＝菜单；4＝按钮）</summary>
    public int MenuType { get; set; } 

    ///<summary>菜单图标</summary>
    public string MenuIcon { get; set; }

    ///<summary>菜单Url</summary>
    [JsonConverter(typeof(StringTrimConverter))]
    public string MenuUrl { get; set; }

    ///<summary>父级ID,顶级为-1</summary>
    public long ParentID { get; set; } 

    ///<summary>权限标示</summary>
    public string PowerTag { get; set; }

    ///<summary>重定向地址</summary>
    public string Redirect { get; set; }

    ///<summary>组件</summary>
    public string Component { get; set; }

    ///<summary>是否启用</summary>
    public bool Enabled { get; set; } 

    ///<summary>排序</summary>
    public int Sort { get; set; }
}

public class UpdateSysMenuRequest : InsertSysMenuRequest
{
    ///<summary>菜单ID</summary>
    public long MenuID { get; set; }
}

public class QuerySysMenuRequest
{
    ///<summary>菜单名称</summary>
    [JsonConverter(typeof(StringTrimConverter))]
    public string MenuName { get; set; }

    ///<summary>是否启用</summary>
    public bool? Enabled { get; set; }
}
